/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2022/12/13 14:44
 * @copyright: 博为峰
 */
public class MethodDemo04 {
    public static void main(String[] args) {
        add(1, 2);
    }

    //可变参数
    public static int add(int... a) {
        for (int i = 0; i < a.length; i++) {
            System.out.println("a[i] = " + a[i]);
        }
        return 0;
    }

    /*public static int add(int b, int... a) {
        return 0;
    }*/

    /*public static int add(int... a, int b) {
        return 0;
    }*/
}
